<html><body>
<style>

body, h1, h2, h3, div, span, p, pre, a {
  margin: 0;
  padding: 0;
  border: 0;
  font-weight: inherit;
  font-style: inherit;
  font-size: 100%;
  font-family: inherit;
  vertical-align: baseline;
}

body {
  font-size: 13px;
  padding: 1em;
}

h1 {
  font-size: 26px;
  margin-bottom: 1em;
}

h2 {
  font-size: 24px;
  margin-bottom: 1em;
}

h3 {
  font-size: 20px;
  margin-bottom: 1em;
  margin-top: 1em;
}

pre, code {
  line-height: 1.5;
  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}

pre {
  margin-top: 0.5em;
}

h1, h2, h3, p {
  font-family: Arial, sans serif;
}

h1, h2, h3 {
  border-bottom: solid #CCC 1px;
}

.toc_element {
  margin-top: 0.5em;
}

.firstline {
  margin-left: 2 em;
}

.method  {
  margin-top: 1em;
  border: solid 1px #CCC;
  padding: 1em;
  background: #EEE;
}

.details {
  font-weight: bold;
  font-size: 14px;
}

</style>

<h1><a href="adsense_v2.html">AdSense Management API</a> . <a href="adsense_v2.accounts.html">accounts</a> . <a href="adsense_v2.accounts.reports.html">reports</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
  <code><a href="adsense_v2.accounts.reports.saved.html">saved()</a></code>
</p>
<p class="firstline">Returns the saved Resource.</p>

<p class="toc_element">
  <code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
  <code><a href="#generate">generate(account, currencyCode=None, dateRange=None, dimensions=None, endDate_day=None, endDate_month=None, endDate_year=None, filters=None, languageCode=None, limit=None, metrics=None, orderBy=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</a></code></p>
<p class="firstline">Generates an ad hoc report.</p>
<p class="toc_element">
  <code><a href="#generateCsv">generateCsv(account, currencyCode=None, dateRange=None, dimensions=None, endDate_day=None, endDate_month=None, endDate_year=None, filters=None, languageCode=None, limit=None, metrics=None, orderBy=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</a></code></p>
<p class="firstline">Generates a csv formatted ad hoc report.</p>
<p class="toc_element">
  <code><a href="#getSaved">getSaved(name, x__xgafv=None)</a></code></p>
<p class="firstline">Gets the saved report from the given resource name.</p>
<h3>Method Details</h3>
<div class="method">
    <code class="details" id="close">close()</code>
  <pre>Close httplib2 connections.</pre>
</div>

<div class="method">
    <code class="details" id="generate">generate(account, currencyCode=None, dateRange=None, dimensions=None, endDate_day=None, endDate_month=None, endDate_year=None, filters=None, languageCode=None, limit=None, metrics=None, orderBy=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</code>
  <pre>Generates an ad hoc report.

Args:
  account: string, Required. The account which owns the collection of reports. Format: accounts/{account} (required)
  currencyCode: string, The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account&#x27;s currency if not set.
  dateRange: string, Date range of the report, if unset the range will be considered CUSTOM.
    Allowed values
      REPORTING_DATE_RANGE_UNSPECIFIED - Unspecified date range.
      CUSTOM - A custom date range specified using the `start_date` and `end_date` fields. This is the default if no ReportingDateRange is provided.
      TODAY - Current day.
      YESTERDAY - Yesterday.
      MONTH_TO_DATE - From the start of the current month to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12].
      YEAR_TO_DATE - From the start of the current year to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12].
      LAST_7_DAYS - Last 7 days, excluding current day.
      LAST_30_DAYS - Last 30 days, excluding current day.
  dimensions: string, Dimensions to base the report on. (repeated)
    Allowed values
      DIMENSION_UNSPECIFIED - Unspecified dimension.
      DATE - Date dimension in YYYY-MM-DD format (e.g. &quot;2010-02-10&quot;).
      WEEK - Week dimension in YYYY-MM-DD format, representing the first day of each week (e.g. &quot;2010-02-08&quot;). The first day of the week is determined by the language_code specified in a report generation request (so e.g. this would be a Monday for &quot;en-GB&quot; or &quot;es&quot;, but a Sunday for &quot;en&quot; or &quot;fr-CA&quot;).
      MONTH - Month dimension in YYYY-MM format (e.g. &quot;2010-02&quot;).
      ACCOUNT_NAME - Account name. The members of this dimension match the values from Account.display_name.
      AD_CLIENT_ID - Unique ID of an ad client. The members of this dimension match the values from AdClient.reporting_dimension_id.
      HOSTED_AD_CLIENT_ID - Unique ID of a sub-account&#x27;s ad client. The members of this dimension match the values from AdClient.reporting_dimension_id (for the sub-account).
      PRODUCT_NAME - Localized product name (e.g. &quot;AdSense for Content&quot;, &quot;AdSense for Search&quot;).
      PRODUCT_CODE - Product code (e.g. &quot;AFC&quot;, &quot;AFS&quot;). The members of this dimension match the values from AdClient.product_code.
      AD_UNIT_NAME - Ad unit name (within which an ad was served). The members of this dimension match the values from AdUnit.display_name.
      AD_UNIT_ID - Unique ID of an ad unit (within which an ad was served). The members of this dimension match the values from AdUnit.reporting_dimension_id.
      AD_UNIT_SIZE_NAME - Localized size of an ad unit (e.g. &quot;728x90&quot;, &quot;Responsive&quot;).
      AD_UNIT_SIZE_CODE - The size code of an ad unit (e.g. &quot;728x90&quot;, &quot;responsive&quot;).
      CUSTOM_CHANNEL_NAME - Custom channel name. The members of this dimension match the values from CustomChannel.display_name.
      CUSTOM_CHANNEL_ID - Unique ID of a custom channel. The members of this dimension match the values from CustomChannel.reporting_dimension_id.
      HOSTED_CUSTOM_CHANNEL_ID - Not supported.
      OWNED_SITE_DOMAIN_NAME - Domain name of a verified site (e.g. &quot;example.com&quot;). The members of this dimension match the values from Site.domain.
      OWNED_SITE_ID - Unique ID of a verified site. The members of this dimension match the values from Site.reporting_dimension_id.
      PAGE_URL - URL of the page upon which the ad was served. This is a complete URL including scheme and query parameters. Note that the URL that appears in this dimension may be a canonicalized version of the one that was used in the original request, and so may not exactly match the URL that a user might have seen. Note that there are also some caveats to be aware of when using this dimension. For more information, see [Page URL breakdown](https://support.google.com/adsense/answer/11988478).
      URL_CHANNEL_NAME - Name of a URL channel. The members of this dimension match the values from UrlChannel.uri_pattern.
      URL_CHANNEL_ID - Unique ID of a URL channel. The members of this dimension match the values from UrlChannel.reporting_dimension_id.
      BUYER_NETWORK_NAME - Name of an ad network that returned the winning ads for an ad request (e.g. &quot;Google AdWords&quot;). Note that unlike other &quot;NAME&quot; dimensions, the members of this dimensions are not localized.
      BUYER_NETWORK_ID - Unique (opaque) ID of an ad network that returned the winning ads for an ad request.
      BID_TYPE_NAME - Localized bid type name (e.g. &quot;CPC bids&quot;, &quot;CPM bids&quot;) for a served ad.
      BID_TYPE_CODE - Type of a bid (e.g. &quot;cpc&quot;, &quot;cpm&quot;) for a served ad.
      CREATIVE_SIZE_NAME - Localized creative size name (e.g. &quot;728x90&quot;, &quot;Dynamic&quot;) of a served ad.
      CREATIVE_SIZE_CODE - Creative size code (e.g. &quot;728x90&quot;, &quot;dynamic&quot;) of a served ad.
      DOMAIN_NAME - Localized name of a host on which an ad was served, after IDNA decoding (e.g. &quot;www.google.com&quot;, &quot;Web caches and other&quot;, &quot;bücher.example&quot;).
      DOMAIN_CODE - Name of a host on which an ad was served (e.g. &quot;www.google.com&quot;, &quot;webcaches&quot;, &quot;xn--bcher-kva.example&quot;).
      COUNTRY_NAME - Localized region name of a user viewing an ad (e.g. &quot;United States&quot;, &quot;France&quot;).
      COUNTRY_CODE - CLDR region code of a user viewing an ad (e.g. &quot;US&quot;, &quot;FR&quot;).
      PLATFORM_TYPE_NAME - Localized platform type name (e.g. &quot;High-end mobile devices&quot;, &quot;Desktop&quot;).
      PLATFORM_TYPE_CODE - Platform type code (e.g. &quot;HighEndMobile&quot;, &quot;Desktop&quot;).
      TARGETING_TYPE_NAME - Localized targeting type name (e.g. &quot;Contextual&quot;, &quot;Personalized&quot;, &quot;Run of Network&quot;).
      TARGETING_TYPE_CODE - Targeting type code (e.g. &quot;Keyword&quot;, &quot;UserInterest&quot;, &quot;RunOfNetwork&quot;).
      TRAFFIC_SOURCE_NAME - Localized traffic source name (e.g. &quot;Google&quot;, &quot;Bing&quot;, &quot;Facebook&quot;, &quot;Other&quot;). For more information, see [Traffic source breakdown](https://support.google.com/adsense/answer/16474600).
      TRAFFIC_SOURCE_CODE - Traffic source code (e.g. &quot;GOOGLE&quot;, &quot;BING&quot;, &quot;FACEBOOK&quot;, &quot;OTHER&quot;). For more information, see [Traffic source breakdown](https://support.google.com/adsense/answer/16474600).
      CONTENT_PLATFORM_NAME - Localized content platform name an ad request was made from (e.g. &quot;AMP&quot;, &quot;Web&quot;).
      CONTENT_PLATFORM_CODE - Content platform code an ad request was made from (e.g. &quot;AMP&quot;, &quot;HTML&quot;).
      AD_PLACEMENT_NAME - Localized ad placement name (e.g. &quot;Ad unit&quot;, &quot;Global settings&quot;, &quot;Manual&quot;).
      AD_PLACEMENT_CODE - Ad placement code (e.g. &quot;AD_UNIT&quot;, &quot;ca-pub-123456:78910&quot;, &quot;OTHER&quot;).
      REQUESTED_AD_TYPE_NAME - Localized requested ad type name (e.g. &quot;Display&quot;, &quot;Link unit&quot;, &quot;Other&quot;).
      REQUESTED_AD_TYPE_CODE - Requested ad type code (e.g. &quot;IMAGE&quot;, &quot;RADLINK&quot;, &quot;OTHER&quot;).
      SERVED_AD_TYPE_NAME - Localized served ad type name (e.g. &quot;Display&quot;, &quot;Link unit&quot;, &quot;Other&quot;).
      SERVED_AD_TYPE_CODE - Served ad type code (e.g. &quot;IMAGE&quot;, &quot;RADLINK&quot;, &quot;OTHER&quot;).
      AD_FORMAT_NAME - Localized ad format name indicating the way an ad is shown to the users on your site (e.g. &quot;In-page&quot;, &quot;Anchor&quot;, &quot;Vignette&quot;).
      AD_FORMAT_CODE - Ad format code indicating the way an ad is shown to the users on your site (e.g. &quot;ON_PAGE&quot;, &quot;ANCHOR&quot;, &quot;INTERSTITIAL&quot;).
      CUSTOM_SEARCH_STYLE_NAME - Custom search style name.
      CUSTOM_SEARCH_STYLE_ID - Custom search style id.
      DOMAIN_REGISTRANT - Domain registrants.
      WEBSEARCH_QUERY_STRING - Query strings for web searches.
  endDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
  endDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
  endDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  filters: string, A list of [filters](/adsense/management/reporting/filtering) to apply to the report. All provided filters must match in order for the data to be included in the report. (repeated)
  languageCode: string, The language to use for translating report output. If unspecified, this defaults to English (&quot;en&quot;). If the given language is not supported, report output will be returned in English. The language is specified as an [IETF BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
  limit: integer, The maximum number of rows of report data to return. Reports producing more rows than the requested limit will be truncated. If unset, this defaults to 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum values permitted here. Report truncation can be identified (for `Reports.GenerateReport` only) by comparing the number of rows returned to the value returned in `total_matched_rows`.
  metrics: string, Required. Reporting metrics. (repeated)
    Allowed values
      METRIC_UNSPECIFIED - Unspecified metric.
      PAGE_VIEWS - Number of page views.
      AD_REQUESTS - Number of ad units that requested ads (for content ads) or search queries (for search ads). An ad request may result in zero, one, or multiple individual ad impressions depending on the size of the ad unit and whether any ads were available.
      MATCHED_AD_REQUESTS - Requests that returned at least one ad.
      TOTAL_IMPRESSIONS - Impressions. An impression is counted for each ad request where at least one ad has been downloaded to the user&#x27;s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.
      IMPRESSIONS - Impressions. An impression is counted for each ad request where at least one ad has been downloaded to the user&#x27;s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.
      INDIVIDUAL_AD_IMPRESSIONS - Ads shown. Different ad formats will display varying numbers of ads. For example, a vertical banner may consist of 2 or more ads. Also, the number of ads in an ad unit may vary depending on whether the ad unit is displaying standard text ads, expanded text ads or image ads.
      CLICKS - Number of times a user clicked on a standard content ad.
      PAGE_VIEWS_SPAM_RATIO - Fraction of page views considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      AD_REQUESTS_SPAM_RATIO - Fraction of ad requests considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      MATCHED_AD_REQUESTS_SPAM_RATIO - Fraction of ad requests that returned ads considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      IMPRESSIONS_SPAM_RATIO - Fraction of impressions considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      INDIVIDUAL_AD_IMPRESSIONS_SPAM_RATIO - Fraction of ad impressions considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      CLICKS_SPAM_RATIO - Fraction of clicks considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      AD_REQUESTS_COVERAGE - Ratio of requested ad units or queries to the number returned to the site.
      PAGE_VIEWS_CTR - Ratio of individual page views that resulted in a click.
      AD_REQUESTS_CTR - Ratio of ad requests that resulted in a click.
      MATCHED_AD_REQUESTS_CTR - Ratio of clicks to matched requests.
      IMPRESSIONS_CTR - Ratio of IMPRESSIONS that resulted in a click.
      INDIVIDUAL_AD_IMPRESSIONS_CTR - Ratio of individual ad impressions that resulted in a click.
      ACTIVE_VIEW_MEASURABILITY - Ratio of requests that were measurable for viewability.
      ACTIVE_VIEW_VIEWABILITY - Ratio of requests that were viewable.
      ACTIVE_VIEW_TIME - Mean time an ad was displayed on screen.
      ESTIMATED_EARNINGS - Estimated earnings of the publisher. Note that earnings up to yesterday are accurate, more recent earnings are estimated due to the possibility of spam, or exchange rate fluctuations.
      PAGE_VIEWS_RPM - Revenue per thousand page views. This is calculated by dividing the estimated revenue by the number of page views multiplied by 1000.
      AD_REQUESTS_RPM - Revenue per thousand ad requests. This is calculated by dividing estimated revenue by the number of ad requests multiplied by 1000.
      MATCHED_AD_REQUESTS_RPM - Revenue per thousand matched ad requests. This is calculated by dividing estimated revenue by the number of matched ad requests multiplied by 1000.
      IMPRESSIONS_RPM - Revenue per thousand ad impressions. This is calculated by dividing estimated revenue by the number of ad impressions multiplied by 1000.
      INDIVIDUAL_AD_IMPRESSIONS_RPM - Revenue per thousand individual ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.
      COST_PER_CLICK - Amount the publisher earns each time a user clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.
      ADS_PER_IMPRESSION - Number of ad views per impression.
      TOTAL_EARNINGS - Total earnings are the gross estimated earnings from revenue shared traffic before any parent and child account revenue share is applied.
      WEBSEARCH_RESULT_PAGES - Number of results pages. This metric can only be used when generating a report in the Google timezone, not the account timezone. Since the account timezone is the default for report generation, this metric can only be used by explicitly specifying `reportingTimeZone=GOOGLE_TIME_ZONE`.
      FUNNEL_REQUESTS - Number of requests for non-ad units (for example a related search unit). For more information, see [Funnel requests](https://support.google.com/adsense/answer/11586959).
      FUNNEL_IMPRESSIONS - Number of requests for non-ad units ads that returned content that was shown to the user. For more information, see [Funnel impressions](https://support.google.com/adsense/answer/11585767).
      FUNNEL_CLICKS - Number of times a user clicked on a non-ad unit, triggering further ad requests. For more information, see [Funnel clicks](https://support.google.com/adsense/answer/11586382).
      FUNNEL_RPM - Revenue per thousand funnel impressions. This is calculated by dividing estimated revenue by the number of funnel impressions multiplied by 1000. For more information, see [Funnel RPM](https://support.google.com/adsense/answer/11585979).
  orderBy: string, The name of a dimension or metric to sort the resulting report on, can be prefixed with &quot;+&quot; to sort ascending or &quot;-&quot; to sort descending. If no prefix is specified, the column is sorted ascending. (repeated)
  reportingTimeZone: string, Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
    Allowed values
      REPORTING_TIME_ZONE_UNSPECIFIED - Unspecified timezone.
      ACCOUNT_TIME_ZONE - Use the account timezone in the report.
      GOOGLE_TIME_ZONE - Use the Google timezone in the report (America/Los_Angeles).
  startDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
  startDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
  startDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Result of a generated report.
  &quot;averages&quot;: { # Row representation. # The averages of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty.
    &quot;cells&quot;: [ # Cells in the row.
      { # Cell representation.
        &quot;value&quot;: &quot;A String&quot;, # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers.
      },
    ],
  },
  &quot;endDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. End date of the range (inclusive).
    &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
    &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
    &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  },
  &quot;headers&quot;: [ # The header information; one for each dimension in the request, followed by one for each metric in the request.
    { # The header information of the columns requested in the report.
      &quot;currencyCode&quot;: &quot;A String&quot;, # The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) of this column. Only present if the header type is METRIC_CURRENCY.
      &quot;name&quot;: &quot;A String&quot;, # Required. Name of the header.
      &quot;type&quot;: &quot;A String&quot;, # Required. Type of the header.
    },
  ],
  &quot;rows&quot;: [ # The output rows of the report. Each row is a list of cells; one for each dimension in the request, followed by one for each metric in the request.
    { # Row representation.
      &quot;cells&quot;: [ # Cells in the row.
        { # Cell representation.
          &quot;value&quot;: &quot;A String&quot;, # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers.
        },
      ],
    },
  ],
  &quot;startDate&quot;: { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. Start date of the range (inclusive).
    &quot;day&quot;: 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
    &quot;month&quot;: 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
    &quot;year&quot;: 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  },
  &quot;totalMatchedRows&quot;: &quot;A String&quot;, # The total number of rows matched by the report request.
  &quot;totals&quot;: { # Row representation. # The totals of the report. This is the same length as any other row in the report; cells corresponding to dimension columns are empty.
    &quot;cells&quot;: [ # Cells in the row.
      { # Cell representation.
        &quot;value&quot;: &quot;A String&quot;, # Value in the cell. The dimension cells contain strings, and the metric cells contain numbers.
      },
    ],
  },
  &quot;warnings&quot;: [ # Any warnings associated with generation of the report. These warnings are always returned in English.
    &quot;A String&quot;,
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="generateCsv">generateCsv(account, currencyCode=None, dateRange=None, dimensions=None, endDate_day=None, endDate_month=None, endDate_year=None, filters=None, languageCode=None, limit=None, metrics=None, orderBy=None, reportingTimeZone=None, startDate_day=None, startDate_month=None, startDate_year=None, x__xgafv=None)</code>
  <pre>Generates a csv formatted ad hoc report.

Args:
  account: string, Required. The account which owns the collection of reports. Format: accounts/{account} (required)
  currencyCode: string, The [ISO-4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) to use when reporting on monetary metrics. Defaults to the account&#x27;s currency if not set.
  dateRange: string, Date range of the report, if unset the range will be considered CUSTOM.
    Allowed values
      REPORTING_DATE_RANGE_UNSPECIFIED - Unspecified date range.
      CUSTOM - A custom date range specified using the `start_date` and `end_date` fields. This is the default if no ReportingDateRange is provided.
      TODAY - Current day.
      YESTERDAY - Yesterday.
      MONTH_TO_DATE - From the start of the current month to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-03-01, 2020-03-12].
      YEAR_TO_DATE - From the start of the current year to the current day. e.g. if the current date is 2020-03-12 then the range will be [2020-01-01, 2020-03-12].
      LAST_7_DAYS - Last 7 days, excluding current day.
      LAST_30_DAYS - Last 30 days, excluding current day.
  dimensions: string, Dimensions to base the report on. (repeated)
    Allowed values
      DIMENSION_UNSPECIFIED - Unspecified dimension.
      DATE - Date dimension in YYYY-MM-DD format (e.g. &quot;2010-02-10&quot;).
      WEEK - Week dimension in YYYY-MM-DD format, representing the first day of each week (e.g. &quot;2010-02-08&quot;). The first day of the week is determined by the language_code specified in a report generation request (so e.g. this would be a Monday for &quot;en-GB&quot; or &quot;es&quot;, but a Sunday for &quot;en&quot; or &quot;fr-CA&quot;).
      MONTH - Month dimension in YYYY-MM format (e.g. &quot;2010-02&quot;).
      ACCOUNT_NAME - Account name. The members of this dimension match the values from Account.display_name.
      AD_CLIENT_ID - Unique ID of an ad client. The members of this dimension match the values from AdClient.reporting_dimension_id.
      HOSTED_AD_CLIENT_ID - Unique ID of a sub-account&#x27;s ad client. The members of this dimension match the values from AdClient.reporting_dimension_id (for the sub-account).
      PRODUCT_NAME - Localized product name (e.g. &quot;AdSense for Content&quot;, &quot;AdSense for Search&quot;).
      PRODUCT_CODE - Product code (e.g. &quot;AFC&quot;, &quot;AFS&quot;). The members of this dimension match the values from AdClient.product_code.
      AD_UNIT_NAME - Ad unit name (within which an ad was served). The members of this dimension match the values from AdUnit.display_name.
      AD_UNIT_ID - Unique ID of an ad unit (within which an ad was served). The members of this dimension match the values from AdUnit.reporting_dimension_id.
      AD_UNIT_SIZE_NAME - Localized size of an ad unit (e.g. &quot;728x90&quot;, &quot;Responsive&quot;).
      AD_UNIT_SIZE_CODE - The size code of an ad unit (e.g. &quot;728x90&quot;, &quot;responsive&quot;).
      CUSTOM_CHANNEL_NAME - Custom channel name. The members of this dimension match the values from CustomChannel.display_name.
      CUSTOM_CHANNEL_ID - Unique ID of a custom channel. The members of this dimension match the values from CustomChannel.reporting_dimension_id.
      HOSTED_CUSTOM_CHANNEL_ID - Not supported.
      OWNED_SITE_DOMAIN_NAME - Domain name of a verified site (e.g. &quot;example.com&quot;). The members of this dimension match the values from Site.domain.
      OWNED_SITE_ID - Unique ID of a verified site. The members of this dimension match the values from Site.reporting_dimension_id.
      PAGE_URL - URL of the page upon which the ad was served. This is a complete URL including scheme and query parameters. Note that the URL that appears in this dimension may be a canonicalized version of the one that was used in the original request, and so may not exactly match the URL that a user might have seen. Note that there are also some caveats to be aware of when using this dimension. For more information, see [Page URL breakdown](https://support.google.com/adsense/answer/11988478).
      URL_CHANNEL_NAME - Name of a URL channel. The members of this dimension match the values from UrlChannel.uri_pattern.
      URL_CHANNEL_ID - Unique ID of a URL channel. The members of this dimension match the values from UrlChannel.reporting_dimension_id.
      BUYER_NETWORK_NAME - Name of an ad network that returned the winning ads for an ad request (e.g. &quot;Google AdWords&quot;). Note that unlike other &quot;NAME&quot; dimensions, the members of this dimensions are not localized.
      BUYER_NETWORK_ID - Unique (opaque) ID of an ad network that returned the winning ads for an ad request.
      BID_TYPE_NAME - Localized bid type name (e.g. &quot;CPC bids&quot;, &quot;CPM bids&quot;) for a served ad.
      BID_TYPE_CODE - Type of a bid (e.g. &quot;cpc&quot;, &quot;cpm&quot;) for a served ad.
      CREATIVE_SIZE_NAME - Localized creative size name (e.g. &quot;728x90&quot;, &quot;Dynamic&quot;) of a served ad.
      CREATIVE_SIZE_CODE - Creative size code (e.g. &quot;728x90&quot;, &quot;dynamic&quot;) of a served ad.
      DOMAIN_NAME - Localized name of a host on which an ad was served, after IDNA decoding (e.g. &quot;www.google.com&quot;, &quot;Web caches and other&quot;, &quot;bücher.example&quot;).
      DOMAIN_CODE - Name of a host on which an ad was served (e.g. &quot;www.google.com&quot;, &quot;webcaches&quot;, &quot;xn--bcher-kva.example&quot;).
      COUNTRY_NAME - Localized region name of a user viewing an ad (e.g. &quot;United States&quot;, &quot;France&quot;).
      COUNTRY_CODE - CLDR region code of a user viewing an ad (e.g. &quot;US&quot;, &quot;FR&quot;).
      PLATFORM_TYPE_NAME - Localized platform type name (e.g. &quot;High-end mobile devices&quot;, &quot;Desktop&quot;).
      PLATFORM_TYPE_CODE - Platform type code (e.g. &quot;HighEndMobile&quot;, &quot;Desktop&quot;).
      TARGETING_TYPE_NAME - Localized targeting type name (e.g. &quot;Contextual&quot;, &quot;Personalized&quot;, &quot;Run of Network&quot;).
      TARGETING_TYPE_CODE - Targeting type code (e.g. &quot;Keyword&quot;, &quot;UserInterest&quot;, &quot;RunOfNetwork&quot;).
      TRAFFIC_SOURCE_NAME - Localized traffic source name (e.g. &quot;Google&quot;, &quot;Bing&quot;, &quot;Facebook&quot;, &quot;Other&quot;). For more information, see [Traffic source breakdown](https://support.google.com/adsense/answer/16474600).
      TRAFFIC_SOURCE_CODE - Traffic source code (e.g. &quot;GOOGLE&quot;, &quot;BING&quot;, &quot;FACEBOOK&quot;, &quot;OTHER&quot;). For more information, see [Traffic source breakdown](https://support.google.com/adsense/answer/16474600).
      CONTENT_PLATFORM_NAME - Localized content platform name an ad request was made from (e.g. &quot;AMP&quot;, &quot;Web&quot;).
      CONTENT_PLATFORM_CODE - Content platform code an ad request was made from (e.g. &quot;AMP&quot;, &quot;HTML&quot;).
      AD_PLACEMENT_NAME - Localized ad placement name (e.g. &quot;Ad unit&quot;, &quot;Global settings&quot;, &quot;Manual&quot;).
      AD_PLACEMENT_CODE - Ad placement code (e.g. &quot;AD_UNIT&quot;, &quot;ca-pub-123456:78910&quot;, &quot;OTHER&quot;).
      REQUESTED_AD_TYPE_NAME - Localized requested ad type name (e.g. &quot;Display&quot;, &quot;Link unit&quot;, &quot;Other&quot;).
      REQUESTED_AD_TYPE_CODE - Requested ad type code (e.g. &quot;IMAGE&quot;, &quot;RADLINK&quot;, &quot;OTHER&quot;).
      SERVED_AD_TYPE_NAME - Localized served ad type name (e.g. &quot;Display&quot;, &quot;Link unit&quot;, &quot;Other&quot;).
      SERVED_AD_TYPE_CODE - Served ad type code (e.g. &quot;IMAGE&quot;, &quot;RADLINK&quot;, &quot;OTHER&quot;).
      AD_FORMAT_NAME - Localized ad format name indicating the way an ad is shown to the users on your site (e.g. &quot;In-page&quot;, &quot;Anchor&quot;, &quot;Vignette&quot;).
      AD_FORMAT_CODE - Ad format code indicating the way an ad is shown to the users on your site (e.g. &quot;ON_PAGE&quot;, &quot;ANCHOR&quot;, &quot;INTERSTITIAL&quot;).
      CUSTOM_SEARCH_STYLE_NAME - Custom search style name.
      CUSTOM_SEARCH_STYLE_ID - Custom search style id.
      DOMAIN_REGISTRANT - Domain registrants.
      WEBSEARCH_QUERY_STRING - Query strings for web searches.
  endDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
  endDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
  endDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  filters: string, A list of [filters](/adsense/management/reporting/filtering) to apply to the report. All provided filters must match in order for the data to be included in the report. (repeated)
  languageCode: string, The language to use for translating report output. If unspecified, this defaults to English (&quot;en&quot;). If the given language is not supported, report output will be returned in English. The language is specified as an [IETF BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag).
  limit: integer, The maximum number of rows of report data to return. Reports producing more rows than the requested limit will be truncated. If unset, this defaults to 100,000 rows for `Reports.GenerateReport` and 1,000,000 rows for `Reports.GenerateCsvReport`, which are also the maximum values permitted here. Report truncation can be identified (for `Reports.GenerateReport` only) by comparing the number of rows returned to the value returned in `total_matched_rows`.
  metrics: string, Required. Reporting metrics. (repeated)
    Allowed values
      METRIC_UNSPECIFIED - Unspecified metric.
      PAGE_VIEWS - Number of page views.
      AD_REQUESTS - Number of ad units that requested ads (for content ads) or search queries (for search ads). An ad request may result in zero, one, or multiple individual ad impressions depending on the size of the ad unit and whether any ads were available.
      MATCHED_AD_REQUESTS - Requests that returned at least one ad.
      TOTAL_IMPRESSIONS - Impressions. An impression is counted for each ad request where at least one ad has been downloaded to the user&#x27;s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.
      IMPRESSIONS - Impressions. An impression is counted for each ad request where at least one ad has been downloaded to the user&#x27;s device and has begun to load. It is the number of ad units (for content ads) or search queries (for search ads) that showed ads.
      INDIVIDUAL_AD_IMPRESSIONS - Ads shown. Different ad formats will display varying numbers of ads. For example, a vertical banner may consist of 2 or more ads. Also, the number of ads in an ad unit may vary depending on whether the ad unit is displaying standard text ads, expanded text ads or image ads.
      CLICKS - Number of times a user clicked on a standard content ad.
      PAGE_VIEWS_SPAM_RATIO - Fraction of page views considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      AD_REQUESTS_SPAM_RATIO - Fraction of ad requests considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      MATCHED_AD_REQUESTS_SPAM_RATIO - Fraction of ad requests that returned ads considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      IMPRESSIONS_SPAM_RATIO - Fraction of impressions considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      INDIVIDUAL_AD_IMPRESSIONS_SPAM_RATIO - Fraction of ad impressions considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      CLICKS_SPAM_RATIO - Fraction of clicks considered to be spam. Only available to [premium accounts](https://developers.google.com/adsense/management/reference/rest/v2/accounts#Account.FIELDS.premium).
      AD_REQUESTS_COVERAGE - Ratio of requested ad units or queries to the number returned to the site.
      PAGE_VIEWS_CTR - Ratio of individual page views that resulted in a click.
      AD_REQUESTS_CTR - Ratio of ad requests that resulted in a click.
      MATCHED_AD_REQUESTS_CTR - Ratio of clicks to matched requests.
      IMPRESSIONS_CTR - Ratio of IMPRESSIONS that resulted in a click.
      INDIVIDUAL_AD_IMPRESSIONS_CTR - Ratio of individual ad impressions that resulted in a click.
      ACTIVE_VIEW_MEASURABILITY - Ratio of requests that were measurable for viewability.
      ACTIVE_VIEW_VIEWABILITY - Ratio of requests that were viewable.
      ACTIVE_VIEW_TIME - Mean time an ad was displayed on screen.
      ESTIMATED_EARNINGS - Estimated earnings of the publisher. Note that earnings up to yesterday are accurate, more recent earnings are estimated due to the possibility of spam, or exchange rate fluctuations.
      PAGE_VIEWS_RPM - Revenue per thousand page views. This is calculated by dividing the estimated revenue by the number of page views multiplied by 1000.
      AD_REQUESTS_RPM - Revenue per thousand ad requests. This is calculated by dividing estimated revenue by the number of ad requests multiplied by 1000.
      MATCHED_AD_REQUESTS_RPM - Revenue per thousand matched ad requests. This is calculated by dividing estimated revenue by the number of matched ad requests multiplied by 1000.
      IMPRESSIONS_RPM - Revenue per thousand ad impressions. This is calculated by dividing estimated revenue by the number of ad impressions multiplied by 1000.
      INDIVIDUAL_AD_IMPRESSIONS_RPM - Revenue per thousand individual ad impressions. This is calculated by dividing estimated revenue by the number of individual ad impressions multiplied by 1000.
      COST_PER_CLICK - Amount the publisher earns each time a user clicks on an ad. CPC is calculated by dividing the estimated revenue by the number of clicks received.
      ADS_PER_IMPRESSION - Number of ad views per impression.
      TOTAL_EARNINGS - Total earnings are the gross estimated earnings from revenue shared traffic before any parent and child account revenue share is applied.
      WEBSEARCH_RESULT_PAGES - Number of results pages. This metric can only be used when generating a report in the Google timezone, not the account timezone. Since the account timezone is the default for report generation, this metric can only be used by explicitly specifying `reportingTimeZone=GOOGLE_TIME_ZONE`.
      FUNNEL_REQUESTS - Number of requests for non-ad units (for example a related search unit). For more information, see [Funnel requests](https://support.google.com/adsense/answer/11586959).
      FUNNEL_IMPRESSIONS - Number of requests for non-ad units ads that returned content that was shown to the user. For more information, see [Funnel impressions](https://support.google.com/adsense/answer/11585767).
      FUNNEL_CLICKS - Number of times a user clicked on a non-ad unit, triggering further ad requests. For more information, see [Funnel clicks](https://support.google.com/adsense/answer/11586382).
      FUNNEL_RPM - Revenue per thousand funnel impressions. This is calculated by dividing estimated revenue by the number of funnel impressions multiplied by 1000. For more information, see [Funnel RPM](https://support.google.com/adsense/answer/11585979).
  orderBy: string, The name of a dimension or metric to sort the resulting report on, can be prefixed with &quot;+&quot; to sort ascending or &quot;-&quot; to sort descending. If no prefix is specified, the column is sorted ascending. (repeated)
  reportingTimeZone: string, Timezone in which to generate the report. If unspecified, this defaults to the account timezone. For more information, see [changing the time zone of your reports](https://support.google.com/adsense/answer/9830725).
    Allowed values
      REPORTING_TIME_ZONE_UNSPECIFIED - Unspecified timezone.
      ACCOUNT_TIME_ZONE - Use the account timezone in the report.
      GOOGLE_TIME_ZONE - Use the Google timezone in the report (America/Los_Angeles).
  startDate_day: integer, Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn&#x27;t significant.
  startDate_month: integer, Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.
  startDate_year: integer, Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can&#x27;t be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.
  &quot;contentType&quot;: &quot;A String&quot;, # The HTTP Content-Type header value specifying the content type of the body.
  &quot;data&quot;: &quot;A String&quot;, # The HTTP request/response body as raw binary.
  &quot;extensions&quot;: [ # Application specific response metadata. Must be set in the first response for streaming APIs.
    {
      &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
    },
  ],
}</pre>
</div>

<div class="method">
    <code class="details" id="getSaved">getSaved(name, x__xgafv=None)</code>
  <pre>Gets the saved report from the given resource name.

Args:
  name: string, Required. The name of the saved report to retrieve. Format: accounts/{account}/reports/{report} (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Representation of a saved report.
  &quot;name&quot;: &quot;A String&quot;, # Output only. Resource name of the report. Format: accounts/{account}/reports/{report}
  &quot;title&quot;: &quot;A String&quot;, # Report title as specified by publisher.
}</pre>
</div>

</body></html>